<template>
  <li :class="`list-grid-item${isSmall ? ' small' : ''}`">
    <div class="list-grid-item-meta">
      <div class="list-grid-item-meta-avatar" v-if="showAvatar">
        <slot name="avatar"></slot>
      </div>
      <div class="list-grid-item-meta-content">
        <div :class="`list-grid-item-meta-title${isEllipsis ? ' ellipsis' : ''}`" :style="{maxWidth: titleMaxWidth}">
          <slot name="title"></slot>
        </div>
        <div class="list-grid-item-meta-description">
          <slot name="description"></slot>
        </div>
      </div>
    </div>
    <div class="list-grid-item-extra">
      <slot name="extra"></slot>
    </div>
  </li>
</template>

<script>
export default {
  name: "ListGridItem",
  props: {
    titleMaxWidth: String,
    isSmall: {
      type: Boolean,
      default: false
    },
    showAvatar: {
      type: Boolean,
      default: false
    },
    isEllipsis: {
      type: Boolean,
      default: true
    }
  }
}
</script>

<style scoped>

</style>
